﻿<script setup lang="ts" name="HomeIndex">
import { desensitize } from '@/utils/desensitize'
// 数据脱敏测试
const str1 = ref('王五六')
console.log('姓名脱敏：', str1.value, '====>', desensitize(str1.value, 1, 0))
const str2 = ref('王五')
console.log('姓名脱敏：', str2.value, '====>', desensitize(str2.value, 1, 0))
const str3 = ref('32.26')
console.log('金额脱敏：', str3.value, '====>', desensitize(str3.value, 0, 0, ['.']))
const str4 = ref('234,332.26')
console.log('金额脱敏：', str4.value, '====>', desensitize(str4.value, 0, 0, [',', '.']))
const str5 = ref('123456')
console.log('密码脱敏：', str5.value, '====>', desensitize(str5.value, 0, 0))
const str6 = ref('51343620000320711X')
console.log('身份证脱敏：', str6.value, '====>', desensitize(str6.value, 1, 2))
const str7 = ref('人马座天蝎街德芙里188号')
console.log('地址脱敏：', str7.value, '====>', desensitize(str7.value, 6, 0))
const str8 = ref('abc-def@aliyun.com')
console.log('邮箱脱敏：', str8.value, '====>', desensitize(str8.value, 1, str8.value.split('@')[1].length + 1))
const str9 = ref('豫VD8888')
console.log('车牌照脱敏：', str9.value, '====>', desensitize(str9.value, 3, 1))
const str10 = ref('15898985656')
console.log('手机号脱敏：', str10.value, '====>', desensitize(str10.value, 3, 4))
const str11 = ref('037167779898')
console.log('座机号脱敏：', str11.value, '====>', desensitize(str11.value, 4, 2))
const str12 = ref('1101 2564 5898 7865 9527')
console.log('银行卡号脱敏：', str12.value, '====>', desensitize(str12.value, 4, 4, [' ']))
</script>
<template>
  <PageCard center>
    <Development />
  </PageCard>
</template>

<style lang="scss"></style>
